package co.edu.usbcali.hibernate.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * VacunasMascotasId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class VacunasMascotasId implements java.io.Serializable {

	// Fields

	private Long masCodigo;
	private Long vacCodigo;

	// Constructors

	/** default constructor */
	public VacunasMascotasId() {
	}

	/** full constructor */
	public VacunasMascotasId(Long masCodigo, Long vacCodigo) {
		this.masCodigo = masCodigo;
		this.vacCodigo = vacCodigo;
	}

	// Property accessors

	@Column(name = "MAS_CODIGO", nullable = false, precision = 10, scale = 0)
	public Long getMasCodigo() {
		return this.masCodigo;
	}

	public void setMasCodigo(Long masCodigo) {
		this.masCodigo = masCodigo;
	}

	@Column(name = "VAC_CODIGO", nullable = false, precision = 10, scale = 0)
	public Long getVacCodigo() {
		return this.vacCodigo;
	}

	public void setVacCodigo(Long vacCodigo) {
		this.vacCodigo = vacCodigo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof VacunasMascotasId))
			return false;
		VacunasMascotasId castOther = (VacunasMascotasId) other;

		return ((this.getMasCodigo() == castOther.getMasCodigo()) || (this
				.getMasCodigo() != null
				&& castOther.getMasCodigo() != null && this.getMasCodigo()
				.equals(castOther.getMasCodigo())))
				&& ((this.getVacCodigo() == castOther.getVacCodigo()) || (this
						.getVacCodigo() != null
						&& castOther.getVacCodigo() != null && this
						.getVacCodigo().equals(castOther.getVacCodigo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMasCodigo() == null ? 0 : this.getMasCodigo().hashCode());
		result = 37 * result
				+ (getVacCodigo() == null ? 0 : this.getVacCodigo().hashCode());
		return result;
	}

}